package org.yaac.server.egql.evaluator.function;

import java.io.Serializable;
import java.util.List;

import org.yaac.server.egql.evaluator.EvaluationResult;
import org.yaac.server.egql.evaluator.Evaluator;
import org.yaac.server.egql.exception.EGQLException;
import org.yaac.server.egql.processor.ProcessData.ProcessDataRecord;

/**
 * @author Max Zhu (thebbsky@gmail.com)
 *
 */
public abstract class Function implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	protected List<Evaluator> ops;
	
	public List<Evaluator> getOps() {
		return ops;
	}

	public void setOps(List<Evaluator> ops) {
		this.ops = ops;
	}

	/**
	 * @throws EGQLException
	 */
	public abstract void validate() throws EGQLException;
	
	/**
	 * @param record current processing record
	 * @return
	 */
	public abstract EvaluationResult evaluate(ProcessDataRecord record);
}
